import { DemoBlock } from 'demos';
import { ActionsButton } from '@pxxtech/component';
import { sleep } from '@pxxtech/utils';

export default () => {
  return (
    <>
      <DemoBlock title="normal">
        <ActionsButton
          justify="end"
          actions={[
            { children: '取消' },
            {
              color: 'primary',
              children: '确定',
              onClick: () => sleep(3000),
            },
          ]}
        />
      </DemoBlock>
      <DemoBlock title="normal">
        <ActionsButton
          direction="vertical"
          actions={[
            {
              block: true,
              color: 'primary',
              children: '确定',
              onClick: () => sleep(3000),
            },
            {
              block: true,
              children: '取消',
            },
          ]}
        />
      </DemoBlock>
    </>
  );
};
